//======================================================================================================================
// 2007 Copyright Mystic Lake Software
// Based on work Copyright 2002 Phil Karn, KA9Q
//
// This file is part of The Ham Radio Network.
//
// The Ham Radio Network is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// The Ham Radio Network is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//======================================================================================================================
//
//     Author: Rudyard Merriam
//
//      $Id: ReedSolomon255223.h 3 2007-09-19 04:25:45Z k5rud@arrl.net $
//
//======================================================================================================================
//
#ifndef ReedSololmon255223_Include
#define ReedSololmon255223_Include

typedef unsigned char byte;
typedef unsigned int word;

class ReedSolomon255223
{
public:
	ReedSolomon255223();

	void encode(byte * data, byte *bb);
	int decode(byte *data, int *eras_pos, int no_eras);

	static const word MM = 8;
	static const word NN = 255;
	static const int NROOTS = 32;
	static const word FCR = 112;
	static const word PRIM = 11;
	static const word IPRIM = 116;
	static const word pad = 0;
};

#endif